This Clipbook library demonstrates how text can be captured from the Windows Clipboard and used in a document. It optionally uses spoken messages to indicate what it is doing in the background. You can download these message sound files by double-clicking on the "Download sounds" Clip.
To try this feature, open a new document and then launch your web browser, pointing it to a page with links (for example http://www.notetab.com/links.htm). Once the page is displayed, double-click on the "Start" Clip to activate the capture mode. Two capture methods are available. A Clip wizard will prompt you to choose one of them (see explanation below). You also have the choice of storing the captured links in the current document or in a new web page.
1) "Prompt for URL description" method: Copy the URL of a link (browser shortcut menu: "Copy Link Location" in Netscape and "Copy Shortcut" in Internet Explorer). If NoteTab detects that a URL has been copied to the Clipboard, it will come to the front and prompt you to enter a description for the link, after which it will move out of the way again.
2) "All information from Clipboard" method: First copy the URL of a link (browser shortcut menu: "Copy Link Location" in Netscape and "Copy Shortcut" in Internet Explorer), and then copy the information text that describes the link. Continue this procedure by alternating between URL and link description until you've had enough. Take a look at your NoteTab document and you will see perfectly HTML-formatted links.
Double-click on the "Stop" Clip or close the library when you have finished capturing links, otherwise any text you copy to the Clipboard will continue to be pasted into NoteTab.
H=";"
H="Start"
;Show Clip wizard and ask user which capture method to use and whether to create a new document
^!Set %PromptDescription%=^?[Choose capture method==_Prompt for URL description^=True|All information from Clipboard^=False]; %NewDoc%=^?[Place captured links in...==_New document^=True|Current document^=False]
;Set initial values for main variables
^!Set %CheckClipboard%=True; %PasteInfo%=0
;If user does not want to create a new document, skip this procedure
^!IfFalse ^%NewDoc% SkipNewDoc
;Create a new document with specified name for web page
^!Set %KeepNameFormat%=^$GetNameFormat$
^!SetNameFormat Links%0.2d.html
^!Toolbar New Document
^!SetNameFormat ^%KeepNameFormat%
;Add header and title information for new web page
^!InsertHtml <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">^P<HTML>^P<HEAD>^P<TITLE>^?{Web page title=Favorite Links}</TITLE>^P<META name="generator" content="^$GetProgName$ ^$GetProgVersion$">^P</HEAD>^P<BODY>^P^P
;Store position of cursor
^!Set %TextPos%=^$GetRow$
;Add closing tags for end of web page
^!InsertHtml ^P^P<P>Created on ^$GetDate(mmmm dd, yyyy)$</P>^P</BODY>^P</HTML>^P
;Move the cursor back to the saved position
^!SetCursor ^%TextPos%:1
:SkipNewDoc
^!Prompt Capture mode is now enabled
H="Stop"
;Stop checking the Windows Clipboard
^!Set %CheckClipboard%=False
^!Prompt Clipboard capturing stopped. Double-click on the "Start" Clip if you want to continue
H=";"
H="Open Links web page"
^!Continue This Clip will connect your web browser to the page http://www.notetab.com/links.htm. Continue?
^!URL http://www.notetab.com/links.htm
H="Download sounds"
^!Continue This command will activate your web browser and download the sample sound files used in this library. Continue?
^!URL http://www.notetab.com/ftp/clipwavs.zip
^!INFO Once the file has been downloaded to your computer, just unzip its content into the following subdirectory: "^$GetSoundPath$"
H=";"
H="_OnOpen"
;Check if this library has been opened before. If it has, skip the instructions below
^!If ^$GetValue(efoCaptureLinks)$ = 1 Exit
;Save key value to NoteTab's INI file
^!SaveValue efoCaptureLinks=1
;Show instructions contained in the "About this library" Clip
^!Clip "About this library"
H="_OnClipboardChange"
;If we are not supposed to check the Windows Clipboard, end this Clip
^!IfFalse ^%CheckClipboard% End
;If the size of the text in the Clipboard exceeds 255 characters, end this Clip (unlikely to be data for a link)
^!If ^$GetClipboardSize$ > 255 End
;Copy Clipboard text into a variable
^!Set %ClipboardText%=^$GetClipboard$
;Check which capture method was chosen by user. If user wants to type URL description, Jump to PromptInfo label
^!IfTrue ^%PromptDescription% PromptInfo
;Chosen capture method is "All information from Clipboard"
;Check if Clipboard text should contain URL or description text. If we already have the URL part, paste the description, otherwise jump to the AddUrl label
^!IfTrue ^%PasteInfo% Next ELSE AddUrl
;Set the PasteInfo variable to 0 to indicate that the next text copied to the Clipboard should correspond to a URL
^!Set %PasteInfo%=0
;Insert link description and end of tag into the document